home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Floppyshop 2
/
Floppyshop - 2.zip
/
Floppyshop - 2.iso
/
diskmags
/
0022-3.564
/
dmg-3451
/
data
/
tiles.dat
< prev
next >
Wrap
Text File
|
1987-04-21
|
2KB
|
114 lines
Scrolling tiles.
Wheee the fibble.
Ok, you all know how to do this, but it's another source on the
disk anyway...
10 key off : hide : flash off : click off : mode 0 : curs off
: auto back off : update off
Screen set up.
20 H=hunt(start(1) to start(1)+length(1),"PALT")+4
30 copy H,H+320 to logic+32000 : get palette (logic)
Get the palette of the sprite-bank.
40 NFRM=4
Number of frames of animation (16 max as that's the size of
the sprites).
50 reserve as work 10,NFRM*32000
Reserve enough memory for that many.
60 for T=0 to NFRM-1
For each frame.
70 for X=-16+M to 320+M step 16
Do a sprite on a 16 pixel boundry + the value of M (so it's
moved along by a bit each frame).
80 sprite 1,X,0,1 : update
Dump the sprite.
85 X2=X/16*16
Nearest 16 boundry.
90 screen copy physic,X2,0,X2+32,16 to back,X2,0
Copy the sprite to BACK.
100 next X
Alll the way accross the screen.
110 for Y=16 to 192 step 16
120 screen copy physic,0,0,320,15 to physic,0,Y
130 next Y
Copy the line of sprites down the rest of the screen.
140 screen copy physic to start(10)+T*32000
Copy the whole screen to the memory bank.
150 M=M+(16/NFRM)
Move the marker along so we get horizontal motion.
160 next T
And do it for each frame.
170 K=0
A little variable for the colour.
180 repeat
Set up the loop.
190 for T=0 to NFRM-1
Do each frame.
200 physic=start(10)+T*32000
Set physic the the address of the next frame of animation.
210 doke $FFFF8248,K : K=K mod $777+4
Colour the W's.
220 doke $FFFF8240,7 : doke $FFFF8240,0
A raster to show how much time the routine takes up. It may
not be visable at the top of the screen, but it's there.
230 wait vbl
Wait for the little electron gun to finish it's job.
240 next T
Do each frame.
250 until inkey$=" "
Until you press space.
260 default : end
And do a nice clean exit.
note from editor: In Dumbarton you may get scrolling tiles, but in
Abermule you get rolling styles (and they're not a pleasant sight,
I can assure you!)